package dfbz.homework3;
import java.util.HashSet;
import java.util.Random;

public class MyRun implements Runnable{
    @Override
    public void run() {
          int sum=0;
          HashSet<Integer> list=new HashSet<>();
        while (true){
               while (list.size()<10){
                   int i = new Random().nextInt(100)+1;
                   list.add(i);
                   sum+=i;
               }
                System.out.println(list);
                System.out.println("平均数为:"+sum/list.size());
                break;
            }
        }
    }
